package middol.base

import grails.converters.JSON
import middol.result.ResultUtils

/**
* @Description:    全局异常捕获
* @Author:         zhangjiayu@middol.com
* @CreateDate:     2020/7/20 18:24
* @Version:        1.0
*/
trait GlobalExceptionHandle {

    def handle(Exception e){
        e.printStackTrace()
        render ResultUtils.error(e.getMessage()) as JSON
    }
}
